/*This GUI has created for the Warning massege when a user want to configure
 * on the other computer with same user id.
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/*
 * Warning_MachineChange.java
 *
 * Created on Dec 23, 2009, 6:54:23 PM
 */

package com.cloudminga.gui;

import javax.swing.SwingUtilities;
import javax.swing.UIManager;

/**
 *
 * @author jyoti
 */
public class Warning_MachineChange extends javax.swing.JDialog {
    String user_MachID="$67232$89"; // MachID is used to print the UserMachID at runtime

    /** Creates new form Warning_MachineChange */
    public Warning_MachineChange(java.awt.Frame parent, boolean modal) {
        super(parent, modal);
        initComponents();

        try {
            /* code to set the look and feel according to the native operating system */

            UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
            SwingUtilities.updateComponentTreeUI(this);

        } catch (Exception e) {
            System.out.println("Problem in setting look and feel");
        }
        String string="<html>"+
                       "<body"+
                       "<font size=2 color=black>"+
                       "You are configuring a computer that is not registered with PomBlast." +
                       " You can either add the computer"+
                       " you are configuring to your account, or replace a previously backed up "+
                       user_MachID+ // UserID takes at run time
                       " with this computer, which allows you to restore files "+
                       "from USER " +user_MachID+"."+
                       "</body>"+
                       "</html>";

        label_configureDetail.setText(string);
    }

    /** This method is called from within the constructor to
     * initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is
     * always regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {
        bindingGroup = new org.jdesktop.beansbinding.BindingGroup();

        button_Cancel = new javax.swing.JButton();
        button_Next = new javax.swing.JButton();
        Button_back = new javax.swing.JButton();
        panel_top = new javax.swing.JPanel();
        jLabel1 = new javax.swing.JLabel();
        jLabel2 = new javax.swing.JLabel();
        label_logo = new javax.swing.JLabel();
        label_configureDetail = new javax.swing.JLabel();
        radio_AddComputer = new javax.swing.JRadioButton();
        jRadioButton1 = new javax.swing.JRadioButton();

        setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);
        setBackground(new java.awt.Color(51, 51, 255));
        setResizable(false);

        org.jdesktop.beansbinding.Binding binding = org.jdesktop.beansbinding.Bindings.createAutoBinding(org.jdesktop.beansbinding.AutoBinding.UpdateStrategy.READ_WRITE, this, org.jdesktop.beansbinding.ELProperty.create("PmoBlast Backup Configuration Wizard"), this, org.jdesktop.beansbinding.BeanProperty.create("title"));
        bindingGroup.addBinding(binding);

        getContentPane().setLayout(new org.netbeans.lib.awtextra.AbsoluteLayout());

        button_Cancel.setText("Cancel");
        getContentPane().add(button_Cancel, new org.netbeans.lib.awtextra.AbsoluteConstraints(410, 330, -1, -1));

        button_Next.setText("Next");
        getContentPane().add(button_Next, new org.netbeans.lib.awtextra.AbsoluteConstraints(340, 330, 60, -1));

        Button_back.setText("Back");
        getContentPane().add(Button_back, new org.netbeans.lib.awtextra.AbsoluteConstraints(270, 330, -1, -1));

        panel_top.setBackground(new java.awt.Color(204, 204, 204));
        panel_top.setLayout(new org.netbeans.lib.awtextra.AbsoluteLayout());

        jLabel1.setBackground(new java.awt.Color(255, 0, 51));
        jLabel1.setFont(new java.awt.Font("Tahoma", 1, 11)); // NOI18N
        jLabel1.setForeground(new java.awt.Color(255, 0, 0));
        jLabel1.setText("Replacement Machine");
        panel_top.add(jLabel1, new org.netbeans.lib.awtextra.AbsoluteConstraints(10, 10, 130, -1));

        jLabel2.setFont(new java.awt.Font("Tahoma", 0, 10));
        jLabel2.setText("What do you want to do with your new computer?");
        panel_top.add(jLabel2, new org.netbeans.lib.awtextra.AbsoluteConstraints(20, 30, 290, -1));

        label_logo.setIcon(new javax.swing.ImageIcon(getClass().getResource("/images/logo_2.png"))); // NOI18N
        label_logo.setText("jLabel3");
        panel_top.add(label_logo, new org.netbeans.lib.awtextra.AbsoluteConstraints(440, 10, 55, 55));

        getContentPane().add(panel_top, new org.netbeans.lib.awtextra.AbsoluteConstraints(0, 0, 500, 70));

        label_configureDetail.setText("configure_Text");
        getContentPane().add(label_configureDetail, new org.netbeans.lib.awtextra.AbsoluteConstraints(10, 80, 450, 80));

        radio_AddComputer.setText("Add this new computer to my account");
        getContentPane().add(radio_AddComputer, new org.netbeans.lib.awtextra.AbsoluteConstraints(40, 180, 230, -1));

        jRadioButton1.setText("Replace Computer User- User_Id");
        getContentPane().add(jRadioButton1, new org.netbeans.lib.awtextra.AbsoluteConstraints(40, 210, 210, -1));

        bindingGroup.bind();

        pack();
    }// </editor-fold>//GEN-END:initComponents

    /**
    * @param args the command line arguments
    */
//    public static void main(String args[]) {
//        java.awt.EventQueue.invokeLater(new Runnable() {
//            @Override
//            public void run() {
//                Warning_MachineChange dialog = new Warning_MachineChange(new javax.swing.JFrame(), true);
//                dialog.addWindowListener(new java.awt.event.WindowAdapter() {
//                    @Override
//                    public void windowClosing(java.awt.event.WindowEvent e) {
//                        System.exit(0);
//                    }
//                });
//                dialog.setVisible(true);
//            }
//        });
//    }

    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JButton Button_back;
    private javax.swing.JButton button_Cancel;
    private javax.swing.JButton button_Next;
    private javax.swing.JLabel jLabel1;
    private javax.swing.JLabel jLabel2;
    private javax.swing.JRadioButton jRadioButton1;
    private javax.swing.JLabel label_configureDetail;
    private javax.swing.JLabel label_logo;
    private javax.swing.JPanel panel_top;
    private javax.swing.JRadioButton radio_AddComputer;
    private org.jdesktop.beansbinding.BindingGroup bindingGroup;
    // End of variables declaration//GEN-END:variables

}
